package com.itheima.demo01;

import java.io.*;

public class FileReaderDemo01 {
    public static void main(String[] args) throws IOException {
        //字符流  只能操作纯文本文件

        //创建读取文件字符流对象
        FileReader fd = new FileReader("a.txt");

        //创建写入文件字符流对象
        FileWriter fw = new FileWriter("b.txt");

        int b;
        while ((b = fd.read()) != -1) {
            fw.write(b);
        }
        fw.close();
        fd.close();


    }
}
